﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.Services;

namespace Project
{
    public partial class doLogin : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //string un = Request.QueryString["Username"];
            //string pw = Request.QueryString["Password"];
        }

        [WebMethod(EnableSession = false)]
        public static Boolean Login(string username, string password)
        {
            return BUS.userBUS.userLogin(username, password); 
        }

        [WebMethod(EnableSession = true)]
        public static string test()
        {
            return "hello!!!";
        }

        [WebMethod(EnableSession = true)]
        public static string logOut()
        {
            HttpContext.Current.Session["UserName"] = "";
            return "Action Logout.";
        }
    }
}